home *** CD-ROM | disk | FTP | other *** search
/ Clinton - Portrait of Victory / PORTRAIT OF VICTORY.BIN / clntpc16 / eagle34.txt < prev    next >
Text File  |  1992-12-28  |  10KB  |  564 lines

  1. ; The Debates main menu
  2. start34:
  3. pload ehdeb 1
  4. cfade 9 0 414 p1
  5. pfree 1
  6. pload ecsq04 1
  7. cfade 9 0 87 p1
  8. pfree 1
  9. pload ebcams 1
  10. cfade 9 0 29 p1
  11. pfree 1
  12. if @tnum<>0
  13.   cload ebnav 1 1
  14.   cfade 9 0 0 1
  15.   cfree 1
  16. endif
  17. menu34:
  18. set gonum 34
  19. mn34:
  20. waitkey
  21. getkey k
  22. if @k==1
  23.   set num 1
  24.   goto menu341
  25. else
  26.   if @k==2
  27.     set title "ehpa04"
  28.     set tnum 43
  29.     set first 176
  30.     set last 218
  31.     set back "eagle34"
  32.     link eagle41
  33.   else
  34.     if @k==3
  35.       xbkg
  36.       set num 1
  37.       goto menu342
  38.     else
  39.       if @k==chr(104)||@k==chr(72)
  40.         goto help
  41.       else
  42.         if @k==chr(112)||@k==chr(80)
  43.           xbkg2
  44.           link eagle3 menubk
  45.         else
  46.           if @k==chr(101)||@k==chr(69)
  47.             xbkg
  48.             pload edexit 1
  49.             cfade 9 192 201 p1
  50.             pfree 1
  51.             mn34b:
  52.             waitkey
  53.             getkey k
  54.             if @k==chr(13)
  55.               exit
  56.             else
  57.               if @k==chr(27)
  58.                 xbkg
  59.                 pload ecsq04 1
  60.                 cfade 9 0 87 p1
  61.                 pfree 1
  62.                 goto menu34
  63.               else
  64.                 goto mn34b
  65.               endif
  66.             endif
  67.           else
  68.             goto mn34
  69.           endif
  70.         endif
  71.       endif
  72.     endif
  73.   endif
  74. endif
  75.  
  76. ; Photo and Audio Introduction selection display
  77. menu341:
  78. set gonum 341
  79. set abort on
  80. mn341:
  81. pload menum 1
  82. pfade 9 1
  83. pfree 1
  84. pload debp$@num 1
  85. set px (639-p1->xsize)/2
  86. if @px%8<>0
  87.   if @px%8<5
  88.     set px @px-(@px%8)
  89.   else
  90.     set px @px+(8-@px%8)
  91.   endif
  92. endif
  93. set py 67+((355-p1->ysize)/2)
  94. cfade 9 @px @py p1
  95. pfree 1
  96.   set m ""
  97.   if @num==1
  98.     cdplay 25 12
  99.     timer
  100.     waitkey 1200
  101.   endif
  102.   if @num==2
  103.     cdplay 26 9
  104.     timer
  105.     waitkey 900
  106.   endif
  107.   if @num==3
  108.     cdplay 27 18
  109.     timer
  110.     waitkey 1800
  111.   endif
  112.   if @num==4
  113.     cdplay 28 14
  114.     timer
  115.     waitkey 1400
  116.   endif
  117.   if @num==5
  118.     cdplay 29 14
  119.     timer
  120.     waitkey 1400
  121.   endif
  122.   if @num==6
  123.     cdplay 30 9
  124.     timer
  125.     waitkey 900
  126.   endif
  127.   if @num==7
  128.     cdplay 31 11
  129.     timer
  130.     waitkey 1100
  131.   endif
  132.   getkey m
  133.   xstop
  134.   cdstop
  135. if @num==7
  136.   pload ebkg 1
  137.   pfade 9 1
  138.   pfree 1
  139.   set tnum 1
  140.   set abort off
  141.   goto start34
  142. else
  143.   set num @num+1
  144.   goto mn341
  145. endif
  146.  
  147. ; Milestones text selection display
  148. menu342:
  149. set gonum 342
  150. mn342:
  151. pload etxtx 1
  152. cfade 9 40 95 p1
  153. pfree 1
  154. color 15
  155. fload times15 1
  156. fgaps 1 5 3
  157. set buf readfile(debmt$@num$.doc)
  158. window 60 95 580 390
  159. text @@buf
  160. . farfree(@buf)
  161. window
  162. set center on
  163. ffree 1
  164. fload ibm8 1
  165. text 0 115 "Page "$@num$" of 6"
  166. text 0 105 "Press <PGUP> for next or <PGDN> for prior."
  167. set center off
  168. ffree 1
  169. mn342b:
  170. waitkey
  171. getkey k
  172. if @k==1
  173.   set num 1
  174.   goto menu341
  175. else
  176.   if @k==2
  177.     set title "ehpa04"
  178.     set tnum 43
  179.     set first 176
  180.     set last 218
  181.     set back "eagle34"
  182.     link eagle41
  183.   else
  184.     if @k==chr(104)||@k==chr(72)
  185.       goto help
  186.     else
  187.       if @k==chr(112)||@k==chr(80)
  188.         xbkg2
  189.         link eagle3 menubk
  190.       else
  191.         if @k==chr(101)||@k==chr(69)
  192.           xbkg
  193.           pload edexit 1
  194.           cfade 9 192 201 p1
  195.           pfree 1
  196.           mn342c:
  197.           waitkey
  198.           getkey k
  199.           if @k==chr(13)
  200.             exit
  201.           else
  202.             if @k==chr(27)
  203.               xbkg
  204.               goto menu342
  205.             else
  206.               goto mn342c
  207.             endif
  208.           endif
  209.         else
  210.           if @k==chr(73)$chr(1)||@k==chr(72)$chr(1)
  211.             if @num==6
  212.               set num 1
  213.               goto mn342
  214.             else
  215.               set num @num+1
  216.               goto mn342
  217.             endif
  218.           else
  219.             if @k==chr(81)$chr(1)||@k==chr(80)$chr(1)
  220.               if @num==1
  221.                 set num 6
  222.                 goto mn342
  223.               else
  224.                 set num @num-1
  225.                 goto mn342
  226.               endif
  227.             else
  228.               goto mn342b
  229.             endif
  230.           endif
  231.         endif
  232.       endif
  233.     endif
  234.   endif
  235. endif
  236.  
  237. help:
  238. pload apatch 1
  239. cfade 9 0 0 p1
  240. pfree 1
  241. pload eclbb 1
  242. cfade 9 0 29 p1
  243. pfree 1
  244. xbkg
  245. pload edhelp 1
  246. cfade 9 32 74 p1
  247. pfree 1
  248. fload ibm8 1
  249. fgaps 1 4 2
  250. set buf readfile(debhlp.doc)
  251. window 65 345 575 100
  252. color 1
  253. text @@buf
  254. . farfree(@buf)
  255. window
  256. ffree 1
  257. hlp1:
  258. waitkey
  259. getkey k
  260. if @k==chr(13)
  261.   if @gonum==34
  262.     xbkg
  263.     pload ecsq04 1
  264.     cfade 9 0 87 p1
  265.     pfree 1
  266.     pload ebcams 1
  267.     cfade 9 0 29 p1
  268.     pfree 1
  269.     cload ebnav 1 1
  270.     cfade 9 0 0 1
  271.     cfree 1
  272.     goto menu34
  273.   else
  274.     xbkg
  275.     pload ebcams 1
  276.     cfade 9 0 29 p1
  277.     pfree 1
  278.     cload ebnav 1 1
  279.     cfade 9 0 0 1
  280.     cfree 1
  281.     goto menu$@gonum
  282.   endif
  283. else
  284.   goto hlp1
  285. endif
  286.  
  287. xbkg:
  288. cload ebkgx 1 1
  289. cfade 9 0 68 1
  290. cfree 1
  291. return
  292.  
  293. xbkg2:
  294. pload eclbb 1
  295. cfade 9 0 29 p1
  296. pfree 1
  297. cload ebkgx 1 1
  298. cfade 9 0 68 1
  299. cfree 1
  300. pload eclhx 1
  301. cfade 9 0 414 p1
  302. pfree 1
  303. return
  304.  
  305. xStop:
  306. if len(@m)
  307.         cdstop
  308.     pload ebkg 1
  309.     pfade 9 1
  310.     pfree 1    
  311.         set tnum 1
  312.         set abort off
  313.     pop start34
  314. else
  315.     return
  316. endif
  317.  
  318. ;
  319. ;    CDINIT
  320. ;
  321. ;    Check for CD-ROM driver and setup @drive
  322. ;
  323. cdinit:
  324.     int 0x2f 0x1500,0
  325.     if @bx
  326.         global drive chr(@cx+asc("A"))
  327.     else
  328.         global drive ""
  329.     endif
  330.     return
  331.  
  332. cdplay:
  333.     cdtrack    @1 @3 @4 @5
  334.     cdcmd    132,@0,@2*75
  335.     cdcheck    @0,cdplay
  336.     return
  337.  
  338. ;
  339. ;    CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES
  340. ;
  341. ;
  342. cdplayto:
  343.     cdtrack    @1 @2 @3 @4
  344.     local    begin @0
  345.     cdtrack    @5 @6 @7 @8
  346.     local    end @0
  347.     cdcmd    132,@begin,@end-@begin
  348.     cdcheck    @0,cdplayto
  349.     return
  350.  
  351. ;
  352. ;    CDSTOP
  353. ;
  354. ;    Stop playing immediately
  355. ;
  356. cdstop:
  357.     cdcmd    133,0,0
  358.     cdcheck    @0,cdstop
  359.     return
  360.  
  361. ;
  362. ;    CDRESUME
  363. ;
  364. ;    Resume playing from where we issued a CDSTOP
  365. ;
  366. cdresume:
  367.     cdcmd    136,0,0
  368.     cdcheck    @0,cdresume
  369.     return
  370.  
  371. ;
  372. ;    CDSEEK TRACK {MINUTES SECONDS FRAMES}
  373. ;
  374. ;    Seek the CD player head to a track to minimize play startup time.
  375. ;    Parameters are the same as CDPLAY.
  376. ;
  377. cdseek:
  378.     cdtrack @1 @2 @3 @4
  379.     cdcmd 131,@0,0
  380.     cdcheck    @0,cdseek
  381.     return
  382.  
  383. ;
  384. ;    CDEJECT
  385. ;
  386. ;    Open the CD drive's tray/door
  387. ;
  388. cdeject:
  389.     local    buf ofs("1")
  390.     local    bseg seg(@buf);
  391.     poke    @bseg @buf 0                ;Eject Disk
  392.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  393.     cdcheck    @0,cdeject
  394.     return
  395.  
  396. ;
  397. ;    CDCLOSE
  398. ;
  399. ;    Close the CD drive's tray/door
  400. ;
  401. cdclose:
  402.     local    buf ofs("1")
  403.     local    bseg seg(@buf);
  404.     poke    @bseg @buf 5                ;Close Tray
  405.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  406.     cdcheck    @0,cdclose
  407.     return
  408.  
  409.  
  410. ;
  411. ;    CDSTATUS
  412. ;
  413. ;    Return CD Drive status and setup global variables @first and @last
  414. ;
  415. cdstatus:
  416.     local    buf ofs("123456")
  417.     local    bseg seg(@buf);
  418.     poke    @bseg @buf 10                ;Audio Disk Info
  419.     cdcmd    3,@buf|(@bseg<<16),6            ;READ IOCTL Input
  420.     cdcheck    @0,cdstatus
  421.     global    first peek(@bseg,@buf+1)+0
  422.     global    last  peek(@bseg,@buf+2)+0
  423.     poke    @bseg @buf 6                ;Device status
  424.     cdcmd    3,@buf|(@bseg<<16),5            ;READ IOCTL Input
  425.     cdcheck    @0,cdstatus
  426.     return    peekl(@bseg,@buf+1)
  427.  
  428. ;
  429. ;    CDTRACK TRACK MINUTES SECONDS FRAMES
  430. ;
  431. ;    Return the absolute sector number of a track
  432. ;
  433. cdtrack:
  434.     local    buf ofs("1234567")
  435.     local    bseg seg(@buf);
  436.     poke    @bseg @buf 11                ;Get Audio Track Info
  437.     poke    @bseg @buf+1 @1             ;track number
  438.     cdcmd    3,@buf|(@bseg<<16),7            ;READ IOCTL Input
  439.     cdcheck    @0,cdtrack
  440.     return    peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4    ;return track address
  441.  
  442.  
  443. cdcmd:
  444.     local req ofs("12345678901234567890123456")
  445.     local rseg seg(@req)
  446.     poke  @rseg @req 13                ;param length
  447.     poke  @rseg @req+1 0                ;subunit
  448.     poke  @rseg @req+2 @1                ;command code
  449.     pokew @rseg @req+3 0                ;status
  450.     pokel @rseg @req+5 0 0                ;reserved
  451.     poke  @rseg @req+13 1                ;address mode
  452.     pokel @rseg @req+14 @2                ;begin
  453.     pokel @rseg @req+18 @3                ;length
  454.     pokel @rseg @req+22 0                ;reserved
  455.     int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req)
  456.     if peek(@rseg,@req+4)&0x80
  457.         databegin
  458.             "Unknown Error"
  459.             "Write-protect violation"
  460.             "Unknown unit"
  461.             "Drive not Ready"
  462.             "Unknown command"
  463.             "CRC error"
  464.             "Bad drive request structure length"
  465.             "Seek Error"
  466.